package com.xingongchang.baolebei.adapter;

import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.insthub.BeeFramework.adapter.BeeBaseAdapter;
import com.xingongchang.baolebei.R;
import com.xingongchang.baolebei.component.CategorySellingCell;
import com.xingongchang.baolebei.component.ShopHelpCell;
import com.xingongchang.baolebei.model.HelpModel;
import com.xingongchang.baolebei.protocol.SHOPHELP;

public class InfoAdapter extends BeeBaseAdapter
{
    protected static final int TYPE_HELPSELL = 2;

    private HelpModel dataModel;

    public InfoAdapter(Context c, ArrayList dataList) {
        super(c, dataList);
    }

    public InfoAdapter(Context c, HelpModel dataModel) {
        super(c, dataModel.shophelpsList);
        this.dataModel = dataModel;
    }


    @Override
    protected BeeCellHolder createCellHolder(View cellView) {
         
        return null;
    }

    @Override
    public int getViewTypeCount() {

        return 1000;
    }

    @Override
    public int getCount()
    {
        return dataList.size();
    }

    public int getItemViewType(int position)
    {
        return position;
    }




    @Override
    protected View bindData(int position, View cellView, ViewGroup parent,
                            BeeCellHolder h) {
         
        return null;
    }

    @Override
    public View createCellView() {
         
        return null;
    }
    @Override
    public View getView(final int position, View cellView, ViewGroup parent) {

        BeeCellHolder holder = null;

        if (null == cellView )
        {
            cellView = (CategorySellingCell)LayoutInflater.from(mContext).inflate(R.layout.index_category_cell, null);
        }
        else
        {
            return cellView;
        }

        cellView = (ShopHelpCell)LayoutInflater.from(mContext).inflate(R.layout.info_shop_help_cell, null);

        final SHOPHELP shophelp = (SHOPHELP)dataList.get(position);
        ((ShopHelpCell)cellView).bindData(shophelp,mContext,dataModel.data,position);

        return cellView;
    }

}

